﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using EnvSafe.Expression;

namespace Heroius.Abacus
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            //todo:load available ops
            OpFac = new OperatorFactory();
            Maker = new Interpreter(OpFac);

            //regist symbols to maker
            Maker.RegistCommonSymbolAndVariableMapping();
            Maker.RegistVariableMapping("x", "random");

            Calculator = new FormCal();

            Application.Run(Calculator);
        }

        internal static FormCal Calculator;
        internal static OperatorFactory OpFac;
        internal static Interpreter Maker;
    }
}
